<?php
namespace Home\Controller;

class FurnishingController extends HomeController {

    public function index(){      
    	$banner = M("Ad")->where(array('id'=>8))->find();
        $this->assign('banner',$banner);  

        $designerID = M('Designer')->where('cid=6')->getField('id',true);

        $map['show']=1;
        $map['designerID'] = array('in',$designerID);
        $chenshe = M('Case')->where($map)->order('sort asc,id desc')->limit(6)->select();
        $this->assign('chenshe',$chenshe);

        unset($map);
        $map['show']=1;
        $map['cid']=6;
        $designer = M('Designer')->where($map)->order('sort asc,id desc')->limit(12)->select();
        $this->assign('designer',$designer);

        $image = M('AlbumImage')->where('albumID=6')->select();
        $this->assign('image',$image);

        //陈设生活
        $map['cid'] = 20;
		$map['status'] = 1;
    	$map['del'] = 0; 
    	$map['picname'] = array('neq','');
		$shenghuo = M('Article')->where($map)->order('sort asc,id desc')->limit(3)->select();
		$this->assign('shenghuo',$shenghuo);
        $this->display();
    }

}